1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a program, and more particularly, to an image processing apparatus, an image processing method, and a program capable of generating a motion-compensated image or reducing noise in an image.
2. Description of the Related Art
An image photographed with an imaging apparatus such as a camera or a video apparatus include much noise. In particular, an image photographed under low illumination or for a short exposure time generally includes much noise. When an image is photographed under the low illumination or for the short exposure time, one of causes of the image including much noise is a reduction in the amount of charge accumulated in an imaging element since the amount of incident light is small. In order to acquire a bright image based on the imaging data, it is necessary to amplify a signal. When the signal is amplified, the noise generated in an imaging element or in an analog circuit is amplified and thus an image includes much noise.
In order to reduce the noise, long time exposure is effective. However, when exposure is performed for a long time, there is a possibility that image blurring occurs due to camera shaking during the exposure. The method of reducing the noise includes a method of lowering (reducing) noise which is not correlated with time by performing continuous shooting to photograph images repeatedly at a high shutter speed and performing addition averaging of the plurality of images photographed at different times by the continuous shooting so that exposure blurring rarely occurs. However, a problem may arise in that processing efficiency deteriorates since the addition processing of the plurality of images causes a considerable amount of calculation.
For example, Japanese Unexamined Patent Application Publication No. 2009-290827 according to the related art discloses a method of lowering (reducing) noise in a time direction as the method of reducing the noise by performing the addition averaging of the plurality of images photographed at different times by continuous shooting.
In Japanese Unexamined Patent Application Publication No. 2009-290827, a process of performing addition averaging of the pixel values of corresponding pixels of a plurality of images determined to be formed by photographing the same subject by position adjustment of the plurality of images photographed at different times is basically performed. For example, a motion-compensated image (MC image) is generated by moving a subject on a reference image to the same position of the subject on a standard image using the standard image which is a noise reduction target and the reference image before one frame of the standard image. Then, the addition averaging is performed on the corresponding pixels between the standard image and the motion-compensated image (MC image) to generate a noise-reduced image.
However, when this process is performed, the pixels of the motion-compensated image (MC image) may become subject pixels different from the corresponding pixels of the standard image in a region of a moving subject having motions different from the motions of the entire image, for example, a region of a moving subject such as a car or a person. In the motion region, control is performed so as to increase the weight of the pixel values of the standard image by lowering an addition weight of the pixels of the motion-compensated image (MC image) for the standard image.
That is, the noise reduction process is performed such that the addition averaging of the corresponding pixels between the standard image and the motion-compensated image (MC image) is actively performed in a region determined to be a motionless region other than a region of a moving subject, whereas the influence of the addition averaging is reduced to considerably reflect the pixel values of the standard image in a region of a moving subject.
In Japanese Unexamined Patent Application Publication No. 2009-290827, a process of detecting a motion region is performed by comparing a global motion vector (GMV) corresponding to the motion of the entire image to a local motion vector (LMV) which is a motion vector of a block region which is a division region in an image and determining that a block with the large difference obtained by the comparison is a motion region.
The motion determination precision obtained by the process of comparing the global motion vector (GMV) to the local motion vector (LMV) is considerably lowered, when the vector precision is lowered depending on the precision of the generated vector. For example, a block including the motion region of a local region smaller than a block region set to calculate a local motion vector may not sometimes be determined as a motion region block. In this case, in the local motion region, a problem may arise in that addition averaging of the corresponding points of the plurality of same images as motionless regions is performed and thus the noise is further increased.
When the process of detecting the motion vector is performed, the corresponding points are searched by performing a matching process through comparison of the pixel values of the plurality of images continuously photographed. However, for example, when an illumination condition is changed during the photographing of the images, it is difficult to search the corresponding points of the images and thus the motion vector may not be appropriately calculated. In this case, a problem may arise in that the detection precision of the motion region deteriorates in the process of comparing the global motion vector (GMV) to the local motion vector (LMV) and thus an image from which the noise is effectively reduced may not be generated.